home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ASP Advantage 1993
/
The Association of Shareware Professionals Advantage CD-ROM 1993.iso
/
files
/
utilties
/
listr311
/
listr.doc
< prev
next >
Wrap
Text File
|
1992-07-04
|
123KB
|
3,279 lines
┌─────────────────────────────────────────────────────────┐
│ │
│ LISTR - A Text Formatting Program │
│ │
│ Version 3.11 │
│ February 22, 1992 │
│ │
└─────────────────────────────────────────────────────────┘
─────────────────────────────────────────────────────────────
Copyright (c) 1986,87,88,89,90,92 Brent W. Miller
565 Ninth Avenue, Menlo Park, CA 94025 CompuServe 71555,1113
─────────────────────────────────────────────────────────────
Version 3.11 February 22, 1992
LISTR ───────────────────────────────── A Text Formatting Program
TABLE OF CONTENTS
LISTR is Shareware ......................................... iii
Disclaimer and Agreement ................................... iii
Registering LISTR .......................................... v
Making Shareware work for you .............................. v
INTRODUCTION ............................................... 1
NOTATION ................................................... 1
INVOKING LISTR ............................................. 2
WILDCARD FILE SPECIFICATIONS ............................... 4
LISTR COMMANDS ............................................. 4
COMMAND SUMMARY ............................................ 4
LISTR Control Commands ..................................... 5
CmdLead ................................................ 5
AltCmdLead ............................................. 5
PrintCmd ............................................... 6
PrintAlt ............................................... 6
Replace ................................................ 6
Synonym ................................................ 7
Rem .................................................... 7
Listing Format Commands .................................... 7
PageLines #Lines ....................................... 7
PageCols #Columns ...................................... 8
TopLine #Line .......................................... 8
BotLine #Line .......................................... 8
Title #Line ............................................ 9
MarginTxt .............................................. 9
PageNo ................................................. 9
LineNo ................................................. 10
LeftMgn ................................................ 10
OddMgn ................................................. 11
EvenMgn ................................................ 11
TextLen ................................................ 11
TitleMgns .............................................. 12
TitleLeftMgn ........................................... 12
TitleOddMgn ............................................ 13
TitleEvenMgn ........................................... 13
TitleLen ............................................... 14
Wrap ................................................... 15
WrapIndent ............................................. 16
WrapMark ............................................... 17
AutoIndent ............................................. 18
Break .................................................. 19
SetBreak ............................................... 20
Tabs ................................................... 20
SetTabs ................................................ 21
ClearTabs .............................................. 21
Xlate .................................................. 21
SetXlate ............................................... 22
NewPage ................................................ 23
CondPg ................................................. 23
KeepTo ................................................. 23
EndKeep ................................................ 24
Version 3.11 Page i February 22, 1992
LISTR ───────────────────────────────── A Text Formatting Program
TABLE OF CONTENTS (continued)
Include ................................................ 24
NewFilePg .............................................. 25
NewFileLn .............................................. 25
Printer Control Commands ................................... 26
Eject .................................................. 26
FormFeed ............................................... 26
FormFeedChar ........................................... 26
SetupFile .............................................. 27
SetupStrg .............................................. 28
TITLES AND MARGIN TEXT ..................................... 28
Titles ..................................................... 28
Margin Text ................................................ 29
Margin Text on Skipped Lines ............................... 30
Special Print Tokens ....................................... 30
Format Specs ............................................... 32
Enclosing Text in Boxes and Forms .......................... 32
COMMAND FILES .............................................. 34
LISTR COMMANDS ON THE COMMAND LINE ......................... 36
DOS DEVICES ................................................ 38
I/O REDIRECTION ............................................ 38
LISTR AND BATCH FILES ...................................... 39
LISTR EXIT CODE ............................................ 39
LINE LENGTHS, CARRIAGE RETURN AND LINE FEED ................ 40
QUESTIONS AND ANSWERS ...................................... 41
LISTR COMMAND REFERENCE (by function) ...................... 42
LISTR COMMAND REFERENCE (alphabetical) ..................... 43
LISTR TITLE TOKEN REFERENCE ................................ 44
LISTR Registration Form .................................... 45
Version 3.11 Page ii February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
LISTR is Shareware
──────────────────
Shareware distribution gives users a chance to try software
before buying it. If you try a Shareware program and continue
using it, you are expected to register. Individual programs
differ on details -- some request registration while others
require it, some specify a maximum trial period. With
registration, you get anything from the simple right to
continue using the software to an updated program with printed
manual.
Copyright laws apply to both Shareware and commercial
software, and the copyright holder retains all rights, with a
few specific exceptions as stated below. Shareware authors
are accomplished programmers, just like commercial authors,
and the programs are of comparable quality. (In both cases,
there are good programs and bad ones!) The main difference is
in the method of distribution. The author specifically grants
the right to copy and distribute the software, either to all
and sundry or to a specific group. For example, some authors
require written permission before a commercial disk vendor may
copy their Shareware.
Shareware is a distribution method, not a type of software.
You should find software that suits your needs and pocketbook,
whether it's commercial or Shareware. The Shareware system
makes fitting your needs easier, because you can try before
you buy. And because the overhead is low, prices are low
also. Shareware has the ultimate money-back guarantee -- if
you don't use the product, you don't pay for it.
Disclaimer and Agreement
────────────────────────
Users of LISTR must accept this disclaimer of warranty:
"LISTR is supplied as is. The author disclaims all
warranties, expressed or implied, including, without
limitation, the warranties of merchantability and of fitness
for any purpose. The author assumes no liability for damages,
direct or consequential, which may result from the use of
LISTR."
LISTR is a "shareware program" and is provided at no charge to
the user for evaluation. Feel free to share it with your
friends, but please do not give it away altered or as part of
another system. The essence of "user-supported" software is
to provide personal computer users with quality software
without high prices, and yet to provide incentive for
programmers to continue to develop new products. If you find
this program useful and find that you are using LISTR and
continue to use LISTR after a reasonable trial period, you
must make a registration payment of $15.00 to Brent Miller.
The $15.00 registration fee will license one copy for use on
any one computer at any one time. You must treat this
software just like a book. An example is that this software
may be used by any number of people and may be freely moved
from one computer location to another, so long as there is no
Version 3.11 Page iii February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
possibility of it being used at one location while it's being
used at another. Just as a book cannot be read by two
different persons at the same time.
Commercial users of LISTR must register and pay for their
copies of LISTR within 30 days of first use or their license
is withdrawn. Site-License arrangements may be made by
contacting Brent Miller.
Anyone distributing LISTR for any kind of remuneration must
first contact Brent Miller at the address below for
authorization. This authorization will be automatically
granted to distributors recognized by the (ASP) as adhering to
its guidelines for shareware distributors, and such
distributors may begin offering LISTR immediately (However
Brent Miller must still be advised so that the distributor can
be kept up-to-date with the latest version of LISTR.).
You are encouraged to pass a copy of LISTR along to your
friends for evaluation. Please encourage them to register
their copy if they find that they can use it.
Version 3.11 Page iv February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
Registering LISTR
─────────────────
As a registered user of LISTR, you will be entitled to user
support for a period of 90 days from the time that your
registration is received by the author. Support includes
answers to any questions you may have about the use of LISTR,
and fixes to any serious problems that may be discovered. You
will also receive the latest version of LISTR if you are
registering an earlier version, and will receive any LISTR
upgrades that occur during the support period. You will be
notified of future upgrades after the support period. You may
obtain a copy of these upgrades directly from the author for a
$5.00 shipping and handling charge, or obtain them through any
other shareware distribution channels.
Submit your request for support by mail to the author at the
address below, or by CompuServe mail to Brent Miller
71555,1113. You will receive a reply through the same
channel.
I hope you find LISTR helpful and easy to use. If you do then
please register as a LISTR user by sending your name, address,
and a check or money order for $15.00 (US funds only) to:
Brent W. Miller
565 Ninth Avenue
Menlo Park, CA 94025
Please indicate that you are registering LISTR, and state what
version of LISTR you currently use. A registration form is
included in the distribution for your convenience. Simply
print it and send it in to register.
Making Shareware work for you
─────────────────────────────
This program is produced by a member of the Association of
Shareware Professionals (ASP). ASP wants to make sure that
the shareware principle works for you. If you are unable to
resolve a shareware-related problem with an ASP member by
contacting the member directly, ASP may be able to help. The
ASP Ombudsman can help you resolve a dispute or problem with
an ASP member, but does not provide technical support for
members' products. Please write to the ASP Ombudsman at 545
Grover Road, Muskegon, MI 49442 or send a CompuServe message
via CompuServe Mail to ASP Ombudsman 70007,3536.
Version 3.11 Page v February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
INTRODUCTION
────────────
LISTR is a text formatter. It was written with the primary
objective of formatting program listings and other simple
ASCII text files for printing. With LISTR you may add headers
and footers that include file names and dates, page numbers
and other text. You can number lines, control margins, and
keep important blocks of text together on a page. Text may be
included in the margins (e.g., change bars or a box around a
page).
LISTR is NOT a "pretty print" program. It does not re-arrange
the listing to conform to any style guide. LISTR provides
considerable control over the overall appearance of a listing,
but does not interpret the text. It is not specific to any
programming language.
LISTR also provides for character translation (e.g., to
convert the line graphic characters in a file to printable
ASCII characters), and for expansion of tabs.
LISTR has a rich set of commands that make it quite versatile.
The versatility is further enhanced by the ability to redefine
commands.
LISTR formatting commands may be included in the source file.
Formatting commands may also be included in an optional
command file or on the command line when LISTR is invoked.
All commands start with a command prefix. This prefix may be
re-defined so that commands included in the source file are
interpreted as comments by a compiler or assembler that will
process the source file (see COMMAND FILES for examples).
This document describes the use of LISTR and its commands.
NOTATION
────────
Several notational conventions are used in this document.
When defining commands and their parameters, optional
parameters are enclosed in square brackets []. Parentheses
() are used to emphasize grouping.
Where a parameter must be selected from one of several
alternatives, the alternatives are separated by vertical bars
| (indicating a logical OR). All specific parameters are
shown in uppercase (these may be entered in upper or lower
case when using LISTR).
Named numeric parameters are preceded by a pound sign #.
A parameter list of variable length is indicated by an
ellipsis ... . The following example illustrates these
conventions:
SetTabs ALL | (#Column [#Column [#Column [ ... ]]])
SetTabs may take a single parameter, the word ALL, or a list
of one or more Column numbers.
Version 3.11 Page 1 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
Parameters enclosed in angled brackets <> are to be replaced
by a name or other string. The following parameters will be
seen in some of the command definitions:
Parameter Description Example
───────────────────────────────────────────────────────────
<cde> - Decimal character code: 65 (ASCII for 'A')
$<hex> - Hexadecimal character code: $41 (ASCII for 'A')
'<chr>' - Quoted ASCII character: 'A'
'<stg>' - Quoted ASCII string: 'ABCDEF01234'
<delim> - Delimiting Character /
Note: the single quote (') may not be included
in these quoted strings. Use the ASCII code
(39 or $27) to specify the single quote.
Other parameter names should be self explanatory. These
conventions should become obvious through the examples given
along the way.
In some examples, the column numbers of characters on the
input and output lines are important in illustrating the
effect of the example. In those cases, a ruler line such as
the following will be used:
....:....|....:....|....:....|....:....|....:....|..
The first '.' represents column 1 of the input or output.
Each ':' marks a column which is a multiple of 5, and each '|'
marks a column which is a multiple of 10.
INVOKING LISTR
──────────────
LISTR is provided in the form of a DOS .EXE file, LISTR.EXE.
It is invoked like any .EXE file, by entering the name
(without the .EXE extension). LISTR takes a number of
parameters. The syntax is as follows:
LISTR <list file> [<command file>] [<output file>]
[listr command [listr command [...]]]
LISTR may be followed by optional parameters for a list
file, a command file, and an output file. Drive and Path
specifiers may be included in these names. These three
parameters may be followed by optional listr commands.
<list file> is the name of the file to be listed. DOS file
name wildcards ? and * may be used in <list file>. All files
matching the filespec will be listed.
<command file> is an optional file of LISTR commands that will
be executed before <list file> is listed. This command file
is intended to setup a general document format, and to provide
LISTR commands which are used in common for a number of files.
Command files might be created for Assembly Language, Pascal
and C source files, and for general text files. See COMMAND
FILES for more information on creation and use of these files.
Version 3.11 Page 2 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
The hyphen character (-) may be used in place of <command
file> to prevent use of any command file.
<output file> is the name of a file to which the formatted
listing will be written. If no <output file> is specified,
the listing goes to the default print device, PRN:. PRN:
is the same as LPT1: and is the first parallel printer.
The first three command line parameters for LISTR are always
interpreted as <list file> <command file> <output file>.
<list file> is a required parameter. If no parameters are
specified, a brief description of the correct usage of LISTR
will be displayed.
To use the default for <command file> and/or <output file>
parameters while specifying a later one, the default value
is indicated by an asterisk (*). The asterisk must be
separated from the preceding and following parameters (or
asterisks) by one or more spaces. A hyphen (-) may be used
in place of the <command file> parameter to prevent the use
of any command file.
Examples:
LISTR SOURCE.TXT
In this example, the file SOURCE.TXT will be listed. Since
no command file is specified, the file LISTRCMD.TXT will be
searched for in the drive and path that were in effect when
LISTR was started. If not found there, the drive and path
specified by the LISTRCMD= environment string will be searched
(see COMMAND FILES). No command file will be used if the file
is not found there (or if LISTRCMD= was not set). The listing
will go to the printer because no output file is specified.
listr A:*.pas listrcmd.pas C:\temp\output.prn
All files with the extension .PAS on drive A: will be listed.
The command file listrcmd.pas will be loaded before the
listing starts, and the listing will go to the file output.prn
in the TEMP directory on drive C:. The file listrcmd.pas will
be searched for on startup drive and path and (if not found)
on the drive and path specified by SET LISTRCMD=. Specifying
listrcmd.pas is redundant, since that is the default name
which will be used for *.pas.
LISTR xyzabc.asm * temp.out
The file xyzabc.asm will be listed. The asterisk requests the
default command file LISTRCMD.ASM to be used if it is found.
The listing will go to the file TEMP.OUT. Since no path or
drive is specified for any of these files, the currently
logged drive and path will be used (unless a command file path
has been specified by SET LISTRCMD=).
listr ODDFILE.TXT -
Version 3.11 Page 3 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
The file ODDFILE.TXT will be listed to PRN:. No command file
will be used.
Optional LISTR commands may be specified after the three file
names. Commands included on the command line are executed
after the command file is loaded, so they may be used to
override commands in the command file. Each command must be
preceded by a virgule (/) or a hyphen (-). LISTR commands are
described in the LISTR COMMANDS section below. Special
considerations in using these commands from the command line
are described in LISTR COMMANDS ON THE COMMAND LINE.
WILDCARD FILE SPECIFICATIONS
────────────────────────────
LISTR will accept wildcard file specifications for <list file>
and for files in Include statements. Wildcard expressions use
the characters * and ? to match multiple files. Files will
be listed in directory order. The default command file name
will be formed from the first <list file> found.
LISTR COMMANDS
──────────────
All LISTR commands must start with one of two prefix strings,
the Command Lead or the Alternate Command Lead. When LISTR is
invoked, the Command Lead is .. and the Alternate Command
Lead is disabled. These prefix strings may be defined by the
user (see the CmdLead and AltCmdLead commands).
LISTR examines each line of the list file to see if it
contains the Command prefix or the Alternate Command Prefix
as the first non-blank characters. If either prefix is found,
the text following the command is interpreted as a LISTR
Command. If it is a valid command, the command is executed.
If not, an error message is displayed and the line is ignored.
Extra text after that expected by commands with a fixed number
of parameters is ignored.
The line containing a command may be printed. The default
condition is that command lines are NOT printed (see PrintCmd
and PrintAlt).
COMMAND SUMMARY
───────────────
This section divides the commands into three general groups
and gives a brief description of each command. The commands
described are the default commands which are active when
LISTR is first activated. The commands can be re-defined by
the user (see the Replace and Synonym commands).
Each command is listed between two horizontal lines, along
with the parameters it takes. For commands that take a
numeric parameter the minimum and maximum values are shown.
The default parameter setting is shown in curly brackets. The
following example illustrates the format:
Version 3.11 Page 4 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
─────────────────────────────────────────────────────────
Command #value min <= # <= max {default}
─────────────────────────────────────────────────────────
LISTR Control Commands
──────────────────────
The commands in this group define what commands LISTR
responds to and whether those commands are printed.
─────────────────────────────────────────────────────────
CmdLead <prefix> {..}
─────────────────────────────────────────────────────────
The string <prefix> becomes the current Command Prefix.
The default for CmdLead is two periods (..). If no
string is specified in this command, the command prefix
becomes inactive. If both CmdLead and AltCmdLead are
set inactive, LISTR will no longer recognize any
commands.
Example:
..CmdLead (*
The default command lead .. prefixes the command,
since this example assumes that the prefix has not
been re-defined before. The new command prefix is
(* as a result of this command.
─────────────────────────────────────────────────────────
AltCmdLead <prefix> {}
─────────────────────────────────────────────────────────
The string <prefix> becomes the current Alternate
Command Prefix. AltCmdLead is undefined (inactive) by
default.
Example:
.. ALTCMDLEAD {@-
The alternate command prefix becomes {@- as a
result of this command.
Version 3.11 Page 5 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
─────────────────────────────────────────────────────────
PrintCmd ON|OFF {OFF}
─────────────────────────────────────────────────────────
Turns ON or OFF the printing of lines starting with the
Command Prefix. The default is OFF.
Examples:
..printcmd On
After this command is executed, any line
containing the active command prefix will be
printed.
.. PrintCmd off
Lines containing the command prefix will not be
printed after this command is executed.
─────────────────────────────────────────────────────────
PrintAlt ON|OFF {OFF}
─────────────────────────────────────────────────────────
Turns ON or OFF the printing of lines starting with the
alternate command prefix. The default is OFF. See
PrintCmd above for examples.
─────────────────────────────────────────────────────────
Replace <old command> <new command>
─────────────────────────────────────────────────────────
Replaces <old command> with <new command>. <old
command> is no longer recognized. This command can be
used to change a command name for compatibility with a
compiler. Use care if using existing command names for
<new command>; the re-defined function will replace the
old function. The old function will be lost unless it
was previously assigned a new name with Synonym. Only
the first 32 characters of <new command> are
significant.
Example:
..replace Include I
'I' will now be recognized as the Include command.
This could be used along with an alternate prefix
of {$ to cause LISTR to recognize the Turbo Pascal
{$I directive to print include files.
Version 3.11 Page 6 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
─────────────────────────────────────────────────────────
Synonym <command> <command synonym>
─────────────────────────────────────────────────────────
<command synonym> becomes an alternate command for
<command>. The original <command> is still recognized.
As in Replace, use care if using active command names
for synonyms. Only the first 32 characters of <command
synonym> are retained.
Example:
.. SYNONYM NewPage PageDown
PageDown or NewPage may now be used to force a new
page to be started.
─────────────────────────────────────────────────────────
Rem
─────────────────────────────────────────────────────────
Rem allows remarks or comments to be included in source
files. Text on a line following Rem is ignored.
Example:
..REM This will show in the source, but will not list.
..REM unless PrintCmd is turned on.
Listing Format Commands
───────────────────────
Commands in this group control the format of the listing
output.
─────────────────────────────────────────────────────────
PageLines #Lines 1 <= # <= 32767 {66}
─────────────────────────────────────────────────────────
Sets the total page length to #Lines. PageLines
defaults to 66, which is the number of lines on an ll
inch page at the standard 6 lines per inch. #Lines must
be greater than the currently active BotLine in order to
take effect. Decrease BotLine before reducing PageLines
to avoid conflict.
Example:
..PageLines 88
Set the page length to 88 lines.
Version 3.11 Page 7 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
─────────────────────────────────────────────────────────
PageCols #Columns 1 <= # <= 255 {80}
─────────────────────────────────────────────────────────
Sets the total number of columns on the page to
#Columns. The default value is 80, which works well
with 8.5 inch paper and 10 character per inch printing.
#Columns must be greater than the sum of LeftMgn (or the
larger of OddMgn or EvenMgn if unequal margins are in
use) and TextLen in order to take effect. Decrease
LeftMgn and/or TextLen before reducing PageCols to avoid
conflict.
Example:
.. PageCols 132
Sets the total number of columns on a page to 132.
─────────────────────────────────────────────────────────
TopLine #Line 1 <= # <= 32767 {6}
─────────────────────────────────────────────────────────
#Line is the first line that text of the listing is
printed on. TopLine - 1 lines are skipped (or occupied
by Titles) at the top of each page. #Lines must not be
greater than the currently active BotLine to take
effect. Increase BotLine before increasing TopLine to
avoid conflict. TopLine defaults to 6.
Example:
..topline 4
TopLine is set to 4. Three lines are skipped or
are available for titles at the top of each page.
─────────────────────────────────────────────────────────
BotLine #Line 1 <= # <= 32767 {60}
─────────────────────────────────────────────────────────
#Line is the last line occupied by text on a page.
BotLine defaults to 60, which leaves 6 lines blank or
occupied by titles at the end of a 66 line page. #Line
must be less than PageLines and not less than TopLine.
Increase PageLines first to avoid conflict. If BotLine
is set to a value above the current line, an immediate
NewPage will result.
Example:
..BotLine 64
BotLine is set to 64. Only two lines are skipped
at the end of a 66 line page.
Version 3.11 Page 8 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
─────────────────────────────────────────────────────────
Title #Line
<delim><left><delim><center><delim><right><delim>
─────────────────────────────────────────────────────────
Title defines a string which will be printed on Line
#Line of every following page. Titles are explained
more fully in the TITLES AND MARGIN TEXT section.
Example:
..title 2 /Left Part/Center Part/Right Part/
─────────────────────────────────────────────────────────
MarginTxt <delim><left><delim><right><delim> {///}
─────────────────────────────────────────────────────────
MarginTxt defines text strings which will print in the
left or right margin areas. Typical uses are for change
bars, line numbers, or for framing pages with graphical
line characters. The TITLES AND MARGIN TEXT section
explains the use of these strings, and the inclusion of
tokens which expand to line numbers, file names, etc.
Examples:
..margintxt /| / |/
Print vertical bars in both left and right margins on
following lines.
..MarginTxt ///
Stop printing text in the margins.
─────────────────────────────────────────────────────────
PageNo #Page -32768 <= # <= 32767 {1}
─────────────────────────────────────────────────────────
Sets the current page number to #Page. PageNo is set to
1 when LISTR is invoked, and increases by 1 each time a
new page is started unless changed by the PageNo
command. The current page number may also be changed at
the start of a new file depending on the setting of
NewFilePg.
PageNo will be shown in Titles and Margins in place of
the @Pg: title token. PageNo will "wrap around" to
-32768 from 32767.
Example:
..PAGENO 100
Resets the current page number to 100. If a bottom
title includes @Pg:, it will reflect the new value
on the current page. PageNo will increase by 1 from
this value each time a page is started.
Version 3.11 Page 9 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
─────────────────────────────────────────────────────────
LineNo #Line 0 <= # <= 32767 {1}
─────────────────────────────────────────────────────────
Sets the current line number to #Line. LineNo is set to
1 when LISTR is invoked, and increases by 1 each time a
line is read from the current input file unless changed
by LineNo.
LineNo may be reset at the start of a new file,
depending on the setting of NewFileLn.
LineNo will be shown in Titles and Margins in place of
the @Ln: title token. LineNo will "wrap around" to
-32768 from 32767.
A typical use of LineNo would be to set the starting
line number on the LISTR command line. This would be
useful if a portion of a file is being listed. The
numbers shown could be set to match those of the entire
file.
Example:
..LineNO 275
Resets the current line number to 275. Each new
line read will increment the count from this value.
─────────────────────────────────────────────────────────
LeftMgn #Columns 0 <= # <= 255 {5}
─────────────────────────────────────────────────────────
Sets the number of blank spaces to leave for the left
margin. The sum of LeftMgn and TextLen must not exceed
PageCols. The order of changes to these three
parameters must be such that the sum of LeftMgn and
TextLen is never greater than PageCols. LeftMgn
defaults to 5. The LeftMgn setting will be used on all
pages (see OddMgn and EvenMgn); it essentially sets both
OddMgn and EvenMgn to LeftMgn.
Example:
..LeftMgn 8
Will leave 8 blank spaces on the left of each line
for all lines following the command. This command
takes effect on the next line printed.
Version 3.11 Page 10 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
─────────────────────────────────────────────────────────
OddMgn #Columns 0 <= # <= 255 {5}
─────────────────────────────────────────────────────────
Sets the number of blank spaces to leave for the left
margin on odd numbered pages. The sum of OddMgn and
TextLen must not exceed PageCols. The order of changes
to these three parameters must be such that the sum of
OddMgn and TextLen is never greater than PageCols.
OddMgn defaults to 5 (also see EvenMgn and LeftMgn).
Example:
..OddMgn 12
Will leave 12 blank spaces on all odd numbered
pages. The command takes effect on the next line
printed if the current page is an odd numbered page,
or at the top of the next odd numbered page if not.
─────────────────────────────────────────────────────────
EvenMgn #Columns 0 <= # <= 255 {5}
─────────────────────────────────────────────────────────
Sets the number of blank spaces to leave for the left
margin on odd numbered pages. The sum of EvenMgn and
TextLen must not exceed PageCols. The order of changes
to these three parameters must be such that the sum of
EvenMgn and TextLen is always less than PageCols.
EvenMgn defaults to 5 (also see OddMgn and LeftMgn).
Example:
..EvenMgn 4
Will leave 4 blank spaces on all even numbered
pages. The command takes effect at the top of the
next even numbered page, or on the next line printed
if the current page is even numbered.
─────────────────────────────────────────────────────────
TextLen #Columns 1 <= # <= 255 {70}
─────────────────────────────────────────────────────────
Sets the maximum number of columns which will be
occupied by text in the document. The sum of LeftMgn
(or the larger of OddMgn or EvenMgn if unequal margins
are in use) and TextLen must not exceed PageCols. The
order of changes to these parameters must be such that
the sum of LeftMgn and TextLen is never greater than
PageCols. TextLen defaults to 70.
Example:
..TextLen 120
There will be 120 printable columns on lines
following this command.
Version 3.11 Page 11 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
─────────────────────────────────────────────────────────
TitleMgns ON|OFF {OFF}
─────────────────────────────────────────────────────────
Title margins and text length will be the same as the
normal text margins and length when TitleMgns is OFF.
Turning TitleMgns ON will cause title margins and text
length to be controlled by the values set with
TitleLeftMgn, TitleOddMgn, TitleEvenMgn and TitleLen.
This command allows title margins to be coupled with
or uncoupled from normal text margins.
Changes to TitleMgns take effect at the top of the next
page printed.
Any TitleLeftMgn, TitleOddMgn, TitleEvenMgn or TitleLen
command includes the effect of TitleMgns ON.
Example:
..TitleMgns on
Any previously defined title margin or length
parameters will take effect at the top of the next
page.
─────────────────────────────────────────────────────────
TitleLeftMgn #Columns 0 <= # <= 255 {5}
─────────────────────────────────────────────────────────
Sets the number of blank spaces to leave for the left
margin on title lines. The sum of TitleLeftMgn and
TextLen must not exceed PageCols. The order of changes
to these three parameters must be such that the sum of
TitleLftMgn and TextLen is never greater than PageCols.
TitleLftMgn defaults to 5.
The TitleLftMgn setting will be used on all pages (see
TitleOddMgn and TitleEvenMgn); it essentially sets both
TitleOddMgn and TitleEvenMgn to TitleLftMgn. Changes to
TitleLftMgn do not take effect until the top of the next
page. This command forces TitleMgns ON.
Example:
..TitleLftMgn 2
Will leave 2 blank spaces on the left of each
title line starting at the top of the next page
printed.
Version 3.11 Page 12 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
─────────────────────────────────────────────────────────
TitleOddMgn #Columns 0 <= # <= 255 {5}
─────────────────────────────────────────────────────────
Sets the number of blank spaces to leave for the left
margin of title lines on odd numbered pages.
The sum of TitleOddMgn and TextLen must not exceed
PageCols. The order of changes to these three
parameters must be such that the sum of TitleOddMgn and
TextLen is never greater than PageCols. TitleOddMgn
defaults to 5.
Changes to TitleOddMgn do not take effect until the top
of the next odd numbered page. This command forces
TitleMgns ON.
Example:
..TitleOddMgn 6
Will leave 6 blank spaces on the left of each title
line on odd numbered pages starting at the top of
the next odd numbered page printed.
─────────────────────────────────────────────────────────
TitleEvenMgn #Columns 0 <= # <= 255 {5}
─────────────────────────────────────────────────────────
Sets the number of blank spaces to leave for the left
margin of title lines on even numbered pages. The sum
of TitleEvenMgn and TextLen must not exceed PageCols.
The order of changes to these three parameters must be
such that the sum of TitleEvenMgn and TextLen is never
greater than PageCols. TitleEvenMgn defaults to 5.
Changes to TitleEvenMgn do not take effect until the top
of the next even numbered page. This command forces
TitleMgns ON.
Example:
..TitleEvenMgn 3
Will leave 3 blank spaces on the left of each title
line on even numbered pages starting at the top of
the next even numbered page printed.
Version 3.11 Page 13 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
─────────────────────────────────────────────────────────
TitleLen #Columns 1 <= # <= 255 {70}
─────────────────────────────────────────────────────────
Sets the maximum number of columns which will be
occupied by text on title lines. The sum of the left
title margin in effect and TitleLen must not exceed
PageCols.
The left title margin in effect is the larger of
TitleLeftMgn, TitleOddMgn or TitleEvenMgn if TitleMgns
are ON, and larger of LeftMgn, OddMgn or EvenMgn if
TitleMgns are OFF. The order of changes to these
parameters must be such that the sum of the effective
TitleLeftMgn and TitleLen is never greater than
PageCols.
Changes to TitleLen take effect at the top of the next
page. This command forces TitleMgns ON. TitleLen
defaults to 70.
Example:
..TitleLen 78
There will be 78 printable columns on title lines
starting at the top of the next page.
Version 3.11 Page 14 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
─────────────────────────────────────────────────────────
Wrap ON|OFF {ON}
─────────────────────────────────────────────────────────
Turns wrap mode ON or OFF. If wrap mode is ON, any line
longer than TextLen will wrap around to the next line.
The line will break at the right-most break character
(see SetBreak) if there is a break character on the
line and Break is ON. If not, the line will break after
TextLen columns. The wrapped line will be indented (or
out-dented) according to the setting of WrapIndent if
Wrap Mode is on. The indent is relative to the first
non-blank character on the wrapping line if AutoIndent
is ON, and relative to the left margin if not. If wrap
mode is OFF, a line longer than TextLen will be
truncated to TextLen characters. The end of the wrapped
line and beginning of the wrapping portion may be marked
(see WrapMark). Wrap mode defaults to ON.
Example:
..WRAP ON
Lines following this command will wrap to the next
line if the line has more than TextLen characters.
If TextLen is 20 and WrapIndent is 0, the following
line:
....:....|....:....|....:....|....:....|....:....|..
This is a test line that will wrap.
will list as:
....:....|....:....|....:....|....:....|
This is a test line
that will wrap.
.. Wrap OFF
The same source line will list as:
....:....|....:....|....:....|....:....|
This is a test line
Version 3.11 Page 15 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
─────────────────────────────────────────────────────────
WrapIndent #Spaces -255 <= # <= 255 {2}
─────────────────────────────────────────────────────────
Sets the number of spaces to indent the wrapped portion
of a line relative to the first non-blank character in
the original line if AutoIndent is ON, or relative to
the left margin if AutoIndent is OFF. #Spaces can be
positive or negative, effectively indenting or
out-denting the wrapped text. Text will not out-dent
into the left margin nor will it indent past TextLen -
1, regardless of the setting of WrapIndent. WrapIndent
is set to 2 by default.
Example:
.. WrapIndent 4
Lines longer than TextLen after this command will
have the wrapped portion indented 4 spaces relative
to the original line or the left margin. If more
than one wrap is required, all wrapped segments are
indented 4 spaces relative to the original line.
With TextLen set to 22 and AutoIndent ON, the
following source line:
....:....|....:....|....:....|....:....|....:....|..
This is a test line which will wrap more than once
will list as:
....:....|....:....|....:....|....:....|
This is a test line
which will wrap
more than once
The indent is relative to the 'T' in 'This'. The
same line with AutoIndent OFF will list as:
....:....|....:....|....:....|....:....|
This is a test line
which will wrap
more than once
Here, the indent is relative to the left margin.
Version 3.11 Page 16 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
─────────────────────────────────────────────────────────
WrapMark <delim><stg><delim><stg><delim> {///}
─────────────────────────────────────────────────────────
Defines a marker to place at the end of wrapped text,
and another to place at the beginning of the wrapped
portion if Wrap is ON. The first character of the
parameter is the delimiter which will identify the
remaining portions of the markers. The total length of
the two portions of WrapMark must be less than TextLen
or an error will result. The default is no WrapMark.
Text will wrap or truncate so that the markers will fit
within the margins.
Examples:
..WrapMark /|/+/
With Break ON, Wrap ON, TextLen = 20 and WrapIndent
= 2, the following line:
....:....|....:....|....:....|....:....|
This is a basic test.
will list as:
....:....|....:....|....:....|....:....|
This is a basic |
+test.
If Break were OFF, the result would be:
....:....|....:....|....:....|....:....|
This is a basic tes|
+t.
If Wrap were OFF, the result would be:
....:....|....:....|....:....|....:....|
This is a basic tes|
Version 3.11 Page 17 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
─────────────────────────────────────────────────────────
AutoIndent ON|OFF {ON}
─────────────────────────────────────────────────────────
AutoIndent ON will cause the wrapped portion of a line
to indent by WrapIndent spaces relative to the first
non-blank character on the original line. AutoIndent
OFF causes the wrapped portion to indent WrapIndent
spaces from the left margin. AutoIndent defaults to ON.
AutoIndent has no effect if Wrap if OFF.
Examples:
The following examples assume TextLen = 20, Wrap is ON,
WrapIndent is 2, and Break is OFF. It is also assumed
that ..AutoIndent starts in column 1, so the text lines
start in column 4.
..AutoIndent ON
will cause the following source line:
....:....|....:....|....:....|....:....|
Testing AutoIndent now.
to list as:
....:....|....:....|....:....|....:....|
Testing AutoInd
ent now.
The indent of 2 spaces is relative to the start of
text, and indents from the 'T' in column 6.
..AutoIndent OFF
would cause the same source line to list as:
....:....|....:....|....:....|....:....|
Testing AutoInd
ent now.
The indent of 2 spaces is relative to the left
margin with AutoIndent OFF.
Version 3.11 Page 18 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
─────────────────────────────────────────────────────────
Break ON|OFF {ON}
─────────────────────────────────────────────────────────
When Break is ON, lines will wrap after the rightmost
character in the Break Character list. With Break OFF,
lines wrap at the right margin, even in the middle of a
word. Break defaults to ON.
Example:
..break off
With Break OFF, Wrap ON, WrapIndent = 2 and TextLen
set to 20, the following input line:
....:....|....:....|....:....|
This is a test of break.
will list as:
....:....|....:....|....:....|
This is a test of br
eak.
.. break ON
If Break Characters = ' ', the line would list as:
....:....|....:....|....:....|
This is a test of
break.
Version 3.11 Page 19 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
─────────────────────────────────────────────────────────
SetBreak '<stg>'|<cde>|$<hex> ['<stg>'|<cde>|$<hex>
['<stg>'|<cde>|$<hex> [...]] {9 ' '}
─────────────────────────────────────────────────────────
Sets the list of Break Characters to the character
constant(s) specified. Text will wrap on one of these
characters if Wrap is ON and Break is ON. The default
Break Characters are tab (ASCII 9) and space. Each
SetBreak command clears Break Characters and sets the
new values. The effect of previous SetBreak statements
is lost.
SetBreak turns Break ON. The Break ON|OFF command may
be used to turn break on and off without changing the
break characters.
Examples:
..SetBreak ' */+-'
Will cause a line to break after a the rightmost
space or '*', '+', '-', or '/'. This might be
useful if listing a program with mathematical
expressions which do not have many spaces. The
following line:
....:....|....:....|....:....|
x=(a+b+c)*(d+e+f)/(h+i+j)
would list as:
....:....|....:....|....:....|
x=(a+b+c)*
(d+e+f)/
(h+i+j)
if TextLen is 12 and Break is on. Note that the
Break Character remains on the original line.
..SetBreak 9 ' '
Will break on a space or a tab (ASCII 9) character.
This is the default setting for Break Characters.
─────────────────────────────────────────────────────────
Tabs ON|OFF {ON}
─────────────────────────────────────────────────────────
Turning TABS on will cause any TAB (control-I, ASCII 9)
characters in the following text to be expanded to the
next tab stop set by the SetTabs command. With TABS
off, tab characters will not be expanded. The
default state of Tabs is ON.
Example:
..tabs on
All TAB characters in following text will be
expanded to the next tab stop.
Version 3.11 Page 20 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
─────────────────────────────────────────────────────────
SetTabs ALL | (#Column [#Column [#Column [ ... ]]])
{9, 17, 25 ... increment by 8 to 249}
─────────────────────────────────────────────────────────
Sets tab stops in the columns specified. The parameter
ALL may be used instead of a column number list to set
tabs in every column. The ALL specification is more
useful for ClearTabs than for SetTabs. The default tab
settings are 9, 17, 25 .. 153 (every 8 columns).
Example:
..SETTABS 5 10 15 20
Sets tab stops in columns 5, 10, 15 and 20. Any
previously defined tabs remain set.
─────────────────────────────────────────────────────────
ClearTabs ALL | (#Column [#Column [#Column [ ... ]]])
─────────────────────────────────────────────────────────
Clears specified tab stops. The ALL specification may
be used to clear all stops.
Examples:
..ClearTabs All
Clears all previously set tab stops.
..CLEARTABS 5 10
Clears tab stops from columns 5 and 10. Any other
tabs which were set remain set.
─────────────────────────────────────────────────────────
Xlate ON|OFF {OFF}
─────────────────────────────────────────────────────────
Xlate ON enables a character by character translation,
with new characters taken from the Translate Table (see
SetXlate). The default for Xlate is OFF, and the
default Translate Table maps all characters to their
original code. Xlate is turned ON when any translation
pair is defined by SetXlate, and OFF by SetXlate CLR.
If it is necessary to translate characters in only a
portion of a file, Xlate may be turned OFF for the other
parts of the file. Some time will be saved by leaving
Xlate OFF when not required.
Example:
..xlate ON
Following text will be translated according to the
values set in the Translate Table.
Version 3.11 Page 21 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
─────────────────────────────────────────────────────────
SetXlate CLR | ('<chr>'|<cde>|$<hex>:'<chr>'|<cde>|$<hex>
['<chr>'|<cde>|$<hex>:'<chr>'|<cde>|$<hex> [...]]) {CLR}
─────────────────────────────────────────────────────────
SetXlate sets character mapping data in the Translate
Table. The parameter string consists of character
constant pairs, the first of which defines a character
to be translated, and the second the new value. The
keyword CLR may be used instead of a parameter string to
clear the Translate Table for a one to one mapping of
all characters. The CLR state is the default state of
the Translate Table. Each SetXlate adds characters to
the Translate Table. The effect is cumulative until a
SetXlate CLR resets the table.
SetXlate turns translation ON when a translation pair is
defined, and OFF when set to CLR. The Xlate ON|OFF
command may be used to turn translation on and off
without changing the translation table.
Translation takes place after tabs are expanded, and
after commands are interpreted. Un-translated text will
be scanned to form the command and any parameters. If
commands are being printed (PrintCmd ON and/or PrintAlt
ON), command text will be translated before being
printed.
Examples:
..SetXlate 192:'+' 217:'+' 218:'+' 191:'+' 179:'|'
..SetXlate 196:'-'
The decimal codes here are for the line drawing
symbols. They are being re-mapped to symbols which
will print on non-IBM character set printers. If
the source:
┌───┐
│ │
└───┘
is listed with Xlate ON the result is:
+---+
| |
+---+
..SetXlate Clr
Restores the Translate Table to map all characters
to their normal code (i.e., no translation). This
may be used to reset before a new translation is
loaded.
Version 3.11 Page 22 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
─────────────────────────────────────────────────────────
NewPage
─────────────────────────────────────────────────────────
NewPage will cause the current page to be ended, and
printing will resume on a new page.
Example:
..NewPage
─────────────────────────────────────────────────────────
CondPg #Lines 1 <= # <= 32767
─────────────────────────────────────────────────────────
Will end the current page if fewer than #Lines remain.
This command can be used to keep a block of text from
being split on two pages.
Example:
..CondPage 21
Will skip to a new page if fewer than 21 lines
remain on the current page.
─────────────────────────────────────────────────────────
KeepTo
─────────────────────────────────────────────────────────
KeepTo and EndKeep bound a block of text which will not
be printed on the current page unless the entire block
will fit on the lines remaining. If the block is too
long to fit, the current page is ended. Execution of
any LISTR commands between the KeepTo and EndKeep is
deferred until the block is actually printed.
Include commands are not allowed within a KeepTo /
EndKeep block. If an Include is encountered, an error
message is printed and the keep block is ended before
the new file is included.
If a second KeepTo or the end of the current file is
encountered after KeepTo and before the next EndKeep,
an error also results and the keep is ended.
Example:
..KeepTo
Text Line 1 of block to be kept together
Text Line 2
Text Line 3
..EndKeep
The block of 3 lines will be printed on the current
page if the text will all fit (if the text has any
lines that wrap, the added lines must also fit). If
not, a new page will be started.
Version 3.11 Page 23 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
─────────────────────────────────────────────────────────
EndKeep
─────────────────────────────────────────────────────────
Ends a block to be kept together on a page. See KeepTo
above.
─────────────────────────────────────────────────────────
Include <file spec>
─────────────────────────────────────────────────────────
Include will suspend printing of the current file and
begin listing files matching <file spec>. Drive, path
and wild card specifiers are allowed in <file spec>.
Includes may be nested to a depth limited by available
memory, and by the maximum number of files DOS can have
open at one time. That number can be increased by
putting a statement such as FILES=20 in the CONFIG.SYS
file that DOS reads during the boot process.
Examples:
..Include c:\mydir\test.txt
The file currently being listed will be interrupted,
and c:\mydir\test.txt will be listed. The
interrupted listing will resume at the end of the
included file. If NewFilePg is ON, the listing will
start on a new page.
.. Include *.txt
Files matching *.txt will be included in the
listing. The order will be determined by the order
of the files in the DOS directory. Since no drive
or path is specified, the drive and path of the file
containing the Include will be used.
..include c:*.txt
This example specifies a drive, but no path. If the
drive is the same as that of the file containing the
Include, the drive and path of that file will be
used. If the drive is not the same as the parent
file, the path in effect on the specified drive when
LISTR started will be used.
Version 3.11 Page 24 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
─────────────────────────────────────────────────────────
NewFilePg ON|OFF|#Page -32768 <= # <= 32767 {OFF, 1}
─────────────────────────────────────────────────────────
When NewFilePg is ON, each included file will start on
a new page. With NewFilePg OFF, included files will
start listing on the next available line.
If #Page is specified and is greater than zero NewFilePg
is turned on and the first page of each include file
will be numbered #Page. Specifying zero as #Page will
turn NewFilePg OFF. If NewFilePg is turned OFF and ON
with the OFF and ON parameters, a non-zero value of
#Page specified previously will be in effect whenever
NewFilePg is ON.
NewFilePg defaults to OFF, and #Page to 1.
Examples:
..NEWFILEPG ON
Include files will start on a new page after this
command is encountered.
..NewFilePg 1
Include files will start on a new page, and the page
numbering will start at 1.
─────────────────────────────────────────────────────────
NewFileLn ON|OFF|#Line -32768 <= # <= 32767 {ON, 1}
─────────────────────────────────────────────────────────
When NewFileLn is ON, the line number of each new file
will start with #Line. With NewFileLn OFF, the line
numbers will continue to count up through all files
listed.
If #Line is specified and is greater than zero NewFileLn
is turned on and the first line of each include file
will be numbered #Line. Specifying zero as #Line will
turn NewFileLn OFF. If NewFileLn is turned OFF and ON
with the OFF and ON parameters, a non-zero value of
#Page specified previously will be in effect whenever
NewFileLn is ON.
NewFileLn defaults to ON with #Line set to 1.
Examples:
..NEWFILELN ON
New file line numbers will start with #Line after
this command is encountered.
..NewFileLn 1
New file line numbers will start with 1.
Version 3.11 Page 25 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
Printer Control Commands
────────────────────────
Commands in this group concern printer control codes and
sequences.
─────────────────────────────────────────────────────────
Eject ON|OFF {ON}
─────────────────────────────────────────────────────────
Determines whether to eject the last page of a listing.
If Eject is ON, a form feed (or series of line feeds if
FormFeed is OFF) will be issued after the last line of
the listing. If Eject is OFF, the form or line feeds
are suppressed.
Some printers require the page eject, while some print
utilities (such as DOS's PRINT print spooler)
automatically add a page eject. Eject allows the output
to be adjusted for the intended environment.
Example:
.. Eject OFF
─────────────────────────────────────────────────────────
FormFeed ON|OFF {ON}
─────────────────────────────────────────────────────────
Determines whether a form feed character is issued to
end a page. If FormFeed is OFF, line feeds are used to
end the page. If FormFeed in ON, a form feed character
(see FormFeedChar below) will be issued if the end of
text for a page is encountered and no text has been
printed on the last line of the page. If the last line
has been printed, a form feed would cause an empty page
to be ejected. The default is ON.
Example:
.. formfeed OFF
─────────────────────────────────────────────────────────
FormFeedChar '<chr>'|<cde>|$<hex> {12}
─────────────────────────────────────────────────────────
Allows the form feed character to be defined. The
normal form feed character is control L (ASCII 012),
and that is the default for FormFeedChar. The
character may be specified as a quoted character (i.e.
'a'), a decimal ASCII code (i.e., 12) or a hexadecimal
ASCII code preceded by a $ (i.e., $F).
Examples:
..FormFeedChar 10
Defines FormFeedChar to be chr(10), or control J.
Version 3.11 Page 26 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
─────────────────────────────────────────────────────────
SetupFile <file name>
─────────────────────────────────────────────────────────
This command allows a complex set of control codes to be
passed to a printer. These codes might be used to load
a user defined font or to select printer configurations.
The file is a standard ASCII text file, and must consist
of a list of codes in the form of quoted characters,
decimal values, or hexadecimal values. The values must
be in the range of 0 to 255 ($00 to $FF). Text
including and following '*' or '/', and not within a
quoted string, will be ignored as a comment. A line
starting with '-' indicates end of data and terminates
the input. An example of a setup file is:
/* This is a sample Printer Setup File
/*
'abcdef' 010 011 $ff $A0 /* String, decimal and hex
12 244 249 $32
/*
/* This file would pass a total of 14 characters
/* starting with 'a' and ending with hexadecimal
/* code $32 to the printer (or output file).
- End of Data
This line will be ignored.
Example:
..SetupFile c:\mydir\print.set
Interprets and prints characters from the file
c:\mydir\print.set. The '*' and '?' wildcards are
not allowed in a setup file name.
Version 3.11 Page 27 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
─────────────────────────────────────────────────────────
SetupStrg '<stg>'|<cde>|$<hex> ['<stg>'|<cde>|$<hex>
['<stg>'|<cde>|$<hex> [ ... ]]]
─────────────────────────────────────────────────────────
Interprets the specified string and passes the character
codes to the output file or printer. This is intended
to pass short control or setup strings to a printer.
Text starting with '/' or '*', and not part of a quoted
string, is ignored as a comment.
Examples:
.. setupstrg 015
Sends a single control character (chr(15) or control
O) to the printer. This would select compressed
printing mode on an Epson compatible printer.
..SETUPSTRG 27 '&' 0 32 33 /* Decimal Values
.. setupstrg $1A '&' 0 ' !' /* Equivalent Characters
These are equivalent setup strings, and Send five
setup or control characters to the output. The
characters would be ASCII 27 (Escape), '&', and
ASCII 32 and 33, ' !'.
TITLES AND MARGIN TEXT
──────────────────────
LISTR has the ability to print titles in the top and bottom
margins and to include text in the left and right margins.
Title and margin text may include a number of special strings
such as page number, file names, file creation dates and
times, and file line numbers.
Titles
Each title has three substrings: Left, Center and Right. The
general form for the title command is:
Title #Line /<left title>/<center title>/<right title>/
The title substrings are separated by the surrounding
delimiters (/ in the example). The delimiter may be any
character that is not included in the title. The first
character of the title string is used as the delimiter.
The #Line is the line which the title will occupy on the
listing. Titles may be defined for any line on the page, but
will only print when #Line is in the top or bottom margin.
Thus, a title defined for Line 6 will only be printed when the
setting for TopLine is 7 or greater (or when BotLine is less
than 6). The title remains defined if TopLine is less than
7, and will re-appear if TopLine is later set to 7 or more.
When the title is expanded, the center portion is placed in
the center of the text portion (TextLen characters) of the
line first. The Left and Right portions are then overlaid on
the left and right ends. Leading or trailing spaces may be
Version 3.11 Page 28 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
used as part of the Center title to offset the center part
when the left and right titles are of different lengths. The
following example illustrates this:
Source file:
.. PageLines 20
.. textLen 30
..title 1 $Left$Center$Right$
..title 2 /Long Left Title/Center/Right/
..title 3 /Long Left Title/ Center/Right/
Resultant listing:
Left Center Right
Long Left Titleter Right
Long Left Title Center Right
In this example, the left portion of the title on line 2
overwrites the center. The title for line 3 uses leading
spaces in the center string to prevent the problem.
Margin Text
Margin text is specified by two substrings: Left and Right.
The general form for the margin text command is:
MarginTxt /<left margin text>/<right margin text>/
As in the case of titles, the substrings are separated by
delimiters (/ in the example). The delimiter may be any
character that is not included in the title. The first
character of the title string is used as the delimiter.
When margin text is expanded, the left portion is right
justified in the left margin and the right portion is left
justified in the right margin. If the left string is longer
than the active left margin, the excess characters are
truncated from the left of the string. The right string will
start at the end of the text (set by TextLen) and will be
truncated if it would exceed PageCols. The following example
illustrates the expansion of margin text:
Source file:
..TextLen 31
..PageCols 51
..LeftMgn 10
..MarginTxt /Left->/<-Right/
This line is 31 characters long
..LeftMgn 5
..PageCols 41
..MarginTxt /Left->/<-Right/
This line is 31 characters long
Version 3.11 Page 29 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
Resultant Listing:
....:....|....:....|....:....|....:....|....:....|..
Left->This line is 31 characters long<-Right
eft->This line is 31 characters long<-Rig
The first line shows both the left and right portions without
truncation, since both strings fit within the 10 character
space available (LeftMgn is 10, and PageCols - TextLen -
LeftMgn is 10). In the second line, both margins have been
reduced to 5 characters, and the margin text is truncated.
Margin Text on Skipped Lines
When a page break is forced (i.e., by NewPage or KeepTo) LISTR
will skip a number of lines to reach the end of the page.
Margin text will be printed on these lines if there are any
bottom titles defined. Printing margin text in this case
allows enclosing boxes to be created (see Enclosing Test in
Boxes and Forms below).
Margin text will not print on skipped lines if there are no
bottom titles defined. A bottom title may be "undefined" by
specifying a blank (without delimiters) title such as:
..Title 63
Similarly, if margin text is desired on skipped lines but no
bottom titles are needed, a title with only spaces may be used
to "define" a bottom title:
..Title 63 / ///
Special Print Tokens
Various parameters, such as file names, file creation dates,
and current time or date may be included in titles and margin
text. These parameters are requested by including one or more
of the tokens listed below:
Version 3.11 Page 30 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
Token Expands to: Example
──────────────────────────────────────────────────────
@MDr: Drive for Main file C:
@MPa: Path for Main file \MYDIR\
@Mfn: Main file name TEST.TXT
@Mds: Main file Creation date (short) 2-8-87
@Mdl: Main file creation date (long) Feb 8, 1987
@Mt12: Main file creation time (12 hr) 4:32 pm
@Mt24: Main file creation time (24 hr) 16:32
@IDr: Drive for Include file C:
@IPa: Path for Include file \NEWDIR\
@Ifn: Include file name INCLD.TXT
@Ids: Include file creation date (short) 2-8-87
@Idl: Include file creation time (long) Feb 8, 1987
@It12: Include file creation time (12 hr) 4:32 pm
@It24: Include file creation time (24 hr) 16:32
@Cds: Current date (short) 2-8-87
@Cdl: Current date (long) Feb 8, 1987
@Ct12: Current time (12 hr) 4:36 pm
@Ct24: Current time (24 hr) 16:36
@Pg[f]: Current Page Number 24
@Ln[f]: Current Line Number 100
[f] is an optional format spec of
the form .w.f where w is the width
and f is a fill character.
The Main file is the file specified by <list file> when listr
is started. If <list file> contains wild cards that expand to
more than one file, the Main file tokens will reflect the data
for each file as it is listed.
Main file fields will not change as include files are listed.
Include file parameters reflect the file currently being
printed (which may be the Main file).
All Title Tokens start with '@' and end with ':'. The '@'
character may be printed in a title by using '@@' in the
title. The following examples illustrate the use of Title
Tokens in titles and margin text:
Source File:
.. textLen 30
.. title 1 /@CDl://@Ct12:/
.. title 2 /Page @pg:/Printed @@ @CT24://
Resulting Titles:
Feb 8, 1987 4:50 pm
Page 1 Printed @ 16:50
Version 3.11 Page 31 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
Source File:
.. LeftMgn 7
.. MarginTxt /@Ln.3.0:: //
..LineNo 1 /* this resets the line after the commands */
First Line
Second Line
Resulting Output:
001: First Line
002: Second Line
Format Specs
Print Tokens for pure numeric values accept an optional format
specifier which can be used to control the field width and pad
character used in printing the value. This may be used to
force leading zeros, or just to align numbers (such as line
numbers) in the output. The general form for a token with a
format specifier is:
@Token[.w[.f]]:
The w and f each represent a single character. 'w' is the
width and must be 0 through 9. 'f' is a fill character used
to pad the left of the field when the number has fewer than w
digits.
The width may be specified without including a fill character;
a space will be used to fill in that case.
Specifying a width of '0' will print the number with only the
number of characters required, and no fill. This is exactly
the same as not using a format spec. If a width other than
zero is specified and the number exceeds the width of the
field, the field will be filled with '*'.
The following examples show effect of various formats for the
for a line number of 1234. The result is enclosed in quotes
to emphasize leading space characters.
Format Result Comments
─────────────────────────────────────────────────────
@Ln: '1234' no format
@Ln.0: '1234' same as no format
@Ln.5: ' 1234' no fill char, so space is used
@Ln.5.0: '01234' fill with leading '0'
@Ln.3: '***' format too narrow
@Ln.6.:: '::1234' ':' may be used as fill char
@Ln.6..: '..1234' '.' may be used as fill char
Enclosing Text in Boxes and Forms
By combining Titles, MarginTxt and the title and text margin
controls the entire text of a document can be enclosed in a
box or form. The following example illustrates this:
Version 3.11 Page 32 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
Source file:
..TextLen 40
..TopLine 6
..BotLine 10
..PageLines 14
..LeftMgn 5
..TitleLeftMgn 3
..TitleLen 44
..Title 2 /┌──────────/───────────────────────/──────────┐/
..Title 3 /│ Test Document//Page @Pg.3.0: │/
..Title 4 /├──────────/───────────────────────/──────────┤/
..Title 5 /│//│/
..MarginTxt /│ / │/
..Title 11 /│//│/
..Title 12 /├──────────/───────────────────────/──────────┤/
..Title 13 /│/@CDl:/│/
..Title 14 /└──────────/───────────────────────/──────────┘/
This text will be enclosed in
the box form that was created.
..REM
..REM The change in margins here shows
..REM the order required to make margin
..REM text and titles line up after a
..REM change in margins.
..REM
..TitleOddMgn 5
..TitleEvenMgn 7
..newpage
..OddMgn 7
..EvenMgn 9
This text is in a box with the margins
shifted from the previous page. Title
margins were changed before the page
break, and text margins after.
Version 3.11 Page 33 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
Resulting Output:
┌──────────────────────────────────────────┐
│ Test Document Page 001 │
├──────────────────────────────────────────┤
│ │
│ This text will be enclosed in │
│ the box form that was created. │
│ │
│ │
│ │
│ │
├──────────────────────────────────────────┤
│ Feb 4, 1990 │
└──────────────────────────────────────────┘
┌──────────────────────────────────────────┐
│ Test Document Page 002 │
├──────────────────────────────────────────┤
│ │
│ This text is in a box with the margins │
│ shifted from the previous page. Title │
│ margins were changed before the page │
│ break, and text margins after. │
│ │
│ │
├──────────────────────────────────────────┤
│ Feb 4, 1990 │
└──────────────────────────────────────────┘
COMMAND FILES
─────────────
A command file is a file of LISTR commands which can be used
to create a common format for similar documents or listings.
The command file is specified on the command line when LISTR
is invoked:
LISTR [<list file>] [<command file>] [<output file>]
[listr command [listr command [...]]]
If <command file> is not specified, LISTR will look for a
default command file. The default command file name is
LISTRCMD, and the extension is the extension of the <list
file> (i.e., if the list file is MYFILE.TXT, the default
command file name is LISTRCMD.TXT). If <list file> is a
wildcard expression, the extension of the first matching file
will be used to form the default command file name.
The command file will be searched for in the drive and
directory that were current when LISTR started. If the
command file is not found there, the directory specified by
the DOS Environment string LISTRCMD= is searched. If the
command file is not found, no command file is used and
an error message is generated. The error message may be
avoided by using '-' in place of <command file>.
Version 3.11 Page 34 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
The drive and path for command files may be set in the
Environment space with the DOS SET command:
SET LISTRCMD=<drive:\path\>
The final \ is optional; SET LISTRCMD=C:\LISTR\ is
equivalent to SET LISTRCMD=C:\LISTR. The SET command may be
included in the AUTOEXEC.BAT file so that it will be loaded
each time the system is started. This is a convenient way
to specify a central location where command files for common
file types may be collected.
Use SET LISTRCMD= without any drive or path to clear the
setting.
Each line in the command file may contain a LISTR command,
introduced by the Command Lead or the Alternate Command Lead.
Lines which do not have one of these lead strings as the first
non-blank characters on the line will be ignored (and may be
used as comments). Additional comments may be included after
all expected parameters on a line with a command (except for
commands that take a variable number of parameters such as
SetBreak).
Example Command Files for Turbo Pascal program listings:
The following text could be included in the file LISTRCMD.PAS
to be used in formatting Turbo Pascal listings:
/* Command File for Turbo Pascal:
..CmdLead {@ -- commands will be in Pascal comments
{@Title 2 /Listing of//@Mfn: @mdl: @mt12:/
{@Title 63 /Listed @cdl: at @ct12://Page @pg/
{@Wrap ON
{@WrapIndent 4
/* Set AltCmdLead {$ and make I a synonym for Include so
/* included files will be listed. These lines will be
/* printed as well with PrintAlt ON.
{@PrintAlt ON
{@AltCmdLead {$
{@Synonym Include I
/* The following synonyms prevent an 'Unknown Command'
/* error from being generated by compiler directives
/* other than {$I which was defined as 'Include'
{$synonym rem R-}
{$synonym rem B-}
{$synonym rem S-}
{$synonym rem I+}
{$synonym rem N-}
{$synonym rem M
{$synonym rem I-}
{$synonym rem V-}
{$synonym rem V+}
The first line is a comment identifying the file as a Pascal
command file.
The first command re-defines the command lead in string to be
'{@'. This will allow LISTR commands to be included in the
Version 3.11 Page 35 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
Pascal source file as Pascal comments.
The second and third commands define titles which identify the
source file and indicate the time of the listing.
The next 2 lines set the wrap and indent parameters so that
lines that are too long to list will be indented on following
lines.
The next 3 lines are comments. As the comments indicate, the
next block of commands lines should be included if it is
desired to list all include files as well as the main file.
The PrintAlt will cause the Include statements and other
TURBO Pascal compiler directives starting with {$ to be
printed. The commands after the next comment group define
other TURBO Pascal compiler directives to be synonyms with
Rem. This is not necessary, but prevents 'Unknown Command'
error messages.
An Alternate Pascal Command File:
This version of LISTRCMD.PAS will prevent the printing of
program lines starting with '(*deb'. Debug statements in the
program such as the following will not be printed in the
listing:
(*debug*) writeln('X=', x);
(*debug writeln('Y=', y); *)
The Command File:
..CmdLead {@
{@Title 2 /Listing of//@Mfn: @mdl: @mt12:/
{@Title 63 /Listed @cdl: at @ct12://Page @pg/
{@Wrap ON
{@WrapIndent 4
{@PrintAlt OFF
{@AltCmdLead (*deb
LISTR COMMANDS ON THE COMMAND LINE
──────────────────────────────────
LISTR commands may be specified after the three file names on
the command line:
LISTR [<list file>] [<command file>] [<output file>]
[listr command [listr command [...]]]
Commands included on the command line are executed after the
command file is loaded, so they may be used to override
commands in the command file.
Each command on the command line must be preceded by a virgule
(/) or a hyphen (-), rather than by the Command Lead or
Alternate Command Lead.
The characters '<', '>' and '|' are used by DOS to indicate IO
redirection and piping. In order to keep these characters
from being intercepted by DOS, they must be enclosed in quote
Version 3.11 Page 36 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
marks ("")when used on the command line. A quote may be
included in a string by using two consecutive quotes.
Consecutive spaces on the command line will be reduced to a
single space character. This is true even if the spaces are
within quotes. In most cases, a literal ASCII value (32
for space) can be used to get multiple spaces into a
parameter.
Examples:
LISTR *.txt * * /textlen 20 /leftmgn 3
This example lists all files with the .TXT extension on the
current drive. The default command file (LISTRCMD.TXT) will
be used, and output goes to the printer. After the command
file has been loaded, TextLen is set to 20 and LeftMgn is set
to 3.
LISTR *.txt - * /setupstrg "'abc' 32 32 >"
This prints all .txt files to the printer using no command
file. The SetupStrg command sends the characters a, b and c,
two spaces (ASCII 32 is a space) and > to the printer
(presumably as a setup or control string). The parameter were
enclosed in quotes so that the > would not be intercepted by
DOS. The two spaces were specified by their ASCII value
because multiple spaces on the command line are reduced to a
single space.
listr myfile.txt - tmp.out -setbreak " '+=/*<> ' "
List myfile.txt with no command file to tmp.out. Line break
characters are set to +, -, /, *, <, > and space. Again,
quotes were used because of the < and > characters that DOS
would interpret as file redirection. The spaces between the
single and double quotes are for clarity; they may be
omitted.
Listr test.txt * * -CmdLead @@@
List test.txt to PRN (second *) using LISTRCMD.TXT (first *),
and change CmdLead to @@@. This might be used if there are no
LISTR Commands embedded in test.txt, but there are lines
starting with .. (or the CmdLead established in LISTRCMD.TXT).
CmdLead @@@ will be executed after the command file is loaded,
but before test.txt is listed.
The number of commands which can be included on the command
line is limited by the maximum command line length, which is
127 characters (a DOS limit).
Version 3.11 Page 37 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
DOS DEVICES
───────────
LISTR recognizes the following file names as DOS devices:
Name Device
─────────────────────────────────────────────────────
CON Console (Keyboard for input, Screen for output)
PRN Printer (same as LPT1)
LPT1 First Parallel Printer (output only)
LPT2 Second Parallel Printer (output only)
LPT3 Third Parallel Printer (output only)
AUX Serial Port (same as COM1)
COM1 First Serial Port (input or output)
COM2 Second Serial Port (input of output)
COM3 Third Serial Port (input or output)
COM4 Fourth Serial Port (input or output)
NUL Dummy Device (generates immediate end of file
when used for input, discards data when used
for output).
Input devices may be used as the <list file> or <command
file>, and output devices may be used as the <output file>.
Device names may be entered as shown or with a trailing colon
(CON or CON:).
Example:
Listr CON: NUL LPT1
Takes input from the keyboard, reads an empty command file
from NUL, and writes the result to the first parallel printer.
I/O REDIRECTION
───────────────
LISTR supports I/O redirection, which allows input which would
normally come from the keyboard to be read from a file or
device, and output which would normally go to the screen to be
sent to a file or device. Redirection is accomplished by
preceding an output file name with >, and an input source
file with <.
LISTR does not expect any keyborad input in normal operation.
The only input required is when an error is encountered and
the user is prompted to correct the problem. Output from
LISTR includes the file names, page numbers and error
messages. Redirecting input is probably not too useful;
sending LISTR's output to a file could be helpful if a large
number of errors are encountered. All error messages may be
collected in a file for further analysis.
Example:
listr MYFILE.TXT * tmp.out >err.log
File MYFILE.TXT will be listed to the file tmp.out using
LISTRCMD.TXT if it is found.
Version 3.11 Page 38 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
If LISTR encounters no errors in processing MYFILE.TXT,
'err.log' should contain something similar to the following:
LISTR version 3.11 Copyright (c) 1986,87,88,89,92 B. W. Miller
List to: C:\LISTR\TMP.OUT
Command: C:\LISTR\LISTRCMD.TXT
Listing: C:\LISTR\MYFILE.TXT
Page: 1
The page number on the screen is terminated by a carriage
return (CR) without a line feed (LF). This prevents the
display from scrolling, and results in the incrementing page
number display. When the output is redirected to a file, the
file will have lines terminated with only CR. Some editors
will display these as separate lines; using DOS TYPE will
result in a high speed replay of the incrementing line
numbers.
If the CR only lines pose a problem, list the output file to a
new file with LISTR. The lines in the new file will have
CR-LF termination. Be sure to use a new name for the second
output; if the same name is used, the resulting file will be
empty.
LISTR AND BATCH FILES
─────────────────────
If LISTR is executed from a batch file, the number of
parameters passed may limit the use of Listr commands on the
command line. If LISTR.EXE is in C:\LISTR, and the following
line is in C:\LISTRB.BAT:
C:\LISTR\LISTR %1 %2 %3 %4 %5 %6 %7 %8 %9
if LISTR was executed from C:\ by entering a line such as:
LISTRB myfile.txt * * /SetupStrg " '>' 32 32 'a' $1A "
the $1A and final " would not be passed to LISTR. Each group
of characters separated by one or more spaces becomes a
separate parameter in the .BAT file. Only the first 9
parameters get passed through.
It should also be noted that redirection may not work as
expected when using a batch file. The line:
LISTRB myfile.txt * * >temp.out
would not result in LISTR's output going to temp.out.
'>temp.out' is intercepted by DOS and not passed to the .BAT
file. The file temp.out will be empty, and LISTR's output
will go to the screen.
LISTR EXIT CODE
───────────────
When LISTR terminates, it returns an exit code that indicates
whether LISTR completed its operation normally or encountered
one or more errors. This exit code may be tested in a batch
file with the IF ERRORLEVEL command, or it may be tested by
another program that executed LISTR. The exit codes are as
Version 3.11 Page 39 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
follows:
Code Meaning
─────────────────────────────────────────────────────
0 LISTR executed without error (normal return)
1 LISTR encountered one or more non-fatal errors.
Non-fatal errors are errors such as invalid
commands or invalid parameters.
2 LISTR encountered a fatal error and aborted. Fatal
errors are conditions such as file not found that
prevent any processing from taking place.
LINE LENGTHS, CARRIAGE RETURN AND LINE FEED
───────────────────────────────────────────
LISTR will accept lines as long as 255 characters. If an
input line is longer than 255 characters, it will be
truncated.
LISTR will recognize carriage return (ASCII 13) or carriage
return + line feed (ASCII 10) as the end of a line. Line feed
alone will not end a line.
Version 3.11 Page 40 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
QUESTIONS AND ANSWERS
─────────────────────
Q: I inadvertently pressed <Enter> after typing LISTR at the
at the DOS prompt. How can I exit from the File: prompt
without listing a file?
A: Just press <Enter> again. LISTR will terminate if no name
is specified.
Q: How can I interrupt LISTR and get back to DOS without
waiting for a long listing to finish?
A: Press Control-C (hold down the key marked Ctrl and press
C). It may take a few seconds before LISTR halts; the
Control-C will be recognized then next time LISTR writes
to the screen.
Q: After listing a file, the last portion of the text is
missing. What could cause that?
A: Look for a ..KeepTo without a matching ..EndKeep. Text
following ..KeepTo is not printed until the ..EndKeep is
encountered.
Q: I accidentally redirected LISTR output to the same file as
was specified for the output file (i.e., LISTR infile.txt
* out.txt >out.txt). Where is the output?
A: The output file will have the screen output from LISTR.
The listed output was written to disk, but the file was
lost. The disk may have "unallocated file chains" as a
result. Run CHKDSK to gather up the unallocated space
(see DOS documentation).
Version 3.11 Page 41 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
LISTR COMMAND REFERENCE (by function) {Default}
────────────────────────────────────────────────
LISTR Control Commands:
CmdLead <prefix> {..}
AltCmdLead <prefix> {}
PrintCmd ON|OFF {OFF}
PrintAlt ON|OFF {OFF}
Replace <old command> <new command>
Synonym <command> <command synonym>
Rem
Listing Format Commands:
PageLines #Lines {66}
PageCols #Columns {80}
TopLine #Line { 6}
BotLine #Line {60}
PageNo #Page { 1}
LineNo #Line { 1}
LeftMgn #Columns { 5}
OddMgn #Columns { 5}
EvenMgn #Columns { 5}
TextLen #Columns {70}
TitleMgns ON|OFF {OFF}
TitleLeftMgn #Columns { 5}
TitleOddMgn #Columns { 5}
TitleEvenMgn #Columns { 5}
TitleLen #Columns {70}
Wrap ON|OFF {ON}
WrapIndent #Spaces { 2}
WrapMark <delim><stg><delim><stg><delim> {///}
AutoIndent ON|OFF {ON}
Break ON|OFF {ON}
SetBreak '<stg>'|<cde>|$<hex> ['<stg>'|<cde>|$<hex>
['<stg>'|<cde>|$<hex> [...]] {9 ' '}
Tabs ON|OFF {ON}
SetTabs ALL | (#Column [#Column [#Column [ ... ]]])
{9, 17, 25 ... increment by 8 to 249}
ClearTabs ALL | (#Column [#Column [#Column [ ... ]]])
Xlate ON|OFF {OFF}
SetXlate CLR | ('<chr>'|<cde>|$<hex>:
'<chr>'|<cde>|$<hex> ['<chr>'|<cde>|$<hex>:
'<chr>'|<cde>|$<hex> [...]]) {CLR}
NewPage
CondPg #Lines
KeepTo
Title #Line /left/center/right/
MarginTxt /left/right/ {///}
Include <file spec>
EndKeep
Include <file spec>
NewFilePg ON|OFF|#Page {OFF, 1}
NewFileLn ON|OFF|#Line {ON, 1}
Printer Control Commands:
Eject ON|OFF {ON}
FormFeed ON|OFF {ON}
FormFeedChar '<chr>'|<cde>|$<hex> {012}
SetupFile <file name>
SetupStrg '<stg>'|<cde>|$<hex> ['<stg>'|<cde>|$<hex>
['<stg>'|<cde>|$<hex> [ ... ]]]
Version 3.11 Page 42 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
LISTR COMMAND REFERENCE (alphabetical) {Default}
─────────────────────────────────────────────────
AltCmdLead <prefix> {}
AutoIndent ON|OFF {ON}
BotLine #Line {60}
Break ON|OFF {ON}
ClearTabs ALL | (#Column [#Column [#Column [ ... ]]])
CmdLead <prefix> {..}
CondPg #Lines
Eject ON|OFF {ON}
EndKeep
EvenMgn #Columns { 5}
FormFeed ON|OFF {ON}
FormFeedChar '<chr>'|<cde>|$<hex> {012}
Include <file spec>
Include <file spec>
KeepTo
LeftMgn #Columns { 5}
LineNo #Line { 1}
MarginTxt /left/right/ {///}
NewFileLn ON|OFF|#Line {ON, 1}
NewFilePg ON|OFF|#Page {OFF, 1}
NewPage
OddMgn #Columns { 5}
PageCols #Columns {80}
PageLines #Lines {66}
PageNo #Page { 1}
PrintAlt ON|OFF {OFF}
PrintCmd ON|OFF {OFF}
Rem
Replace <old command> <new command>
SetBreak '<stg>'|<cde>|$<hex> ['<stg>'|<cde>|$<hex>
['<stg>'|<cde>|$<hex> [...]] {9 ' '}
SetTabs ALL | (#Column [#Column [#Column [ ... ]]])
{9, 17, 25 ... increment by 8 to 249}
SetXlate CLR | ('<chr>'|<cde>|$<hex>:
'<chr>'|<cde>|$<hex> ['<chr>'|<cde>|$<hex>:
'<chr>'|<cde>|$<hex> [...]]) {CLR}
SetupFile <file name>
SetupStrg '<stg>'|<cde>|$<hex> ['<stg>'|<cde>|$<hex>
['<stg>'|<cde>|$<hex> [ ... ]]]
Synonym <command> <command synonym>
Tabs ON|OFF {ON}
TextLen #Columns {70}
Title #Line /left/center/right/
TitleEvenMgn #Columns { 5}
TitleLeftMgn #Columns { 5}
TitleLen #Columns {70}
TitleMgns ON|OFF {OFF}
TitleOddMgn #Columns { 5}
TopLine #Line { 6}
Wrap ON|OFF {ON}
WrapMark <delim><stg><delim><stg><delim> {///}
WrapIndent #Spaces { 2}
Xlate ON|OFF {OFF}
Version 3.11 Page 43 February 22, 1989
LISTR ───────────────────────────────── A Text Formatting Program
LISTR TITLE TOKEN REFERENCE
───────────────────────────
Token Expands to: Example
──────────────────────────────────────────────────────
@MDr: Drive for Main file C:
@MPa: Path for Main file \MYDIR\
@Mfn: Main file name TEST.TXT
@Mds: Main file Creation date (short) 2-8-87
@Mdl: Main file creation date (long) Feb 8, 1987
@Mt12: Main file creation time (12 hr) 4:32 pm
@Mt24: Main file creation time (24 hr) 16:32
@IDr: Drive for Include file C:
@IPa: Path for Include file \NEWDIR\
@Ifn: Include file name INCLD.TXT
@Ids: Include file creation date (short) 2-8-87
@Idl: Include file creation time (long) Feb 8, 1987
@It12: Include file creation time (12 hr) 4:32 pm
@It24: Include file creation time (24 hr) 16:32
@Cds: Current date (short) 2-8-87
@Cdl: Current date (long) Feb 8, 1987
@Ct12: Current time (12 hr) 4:36 pm
@Ct24: Current time (24 hr) 16:36
@Pg[f]: Current Page Number 24
@Ln[f]: Current Line Number 100
──────────────────────────────────────────────────────
[f] is an optional format spec of
the form .w.f where w is the width
and f is a fill character.
LISTR Registration Form
=======================
Please register me as a user of LISTR. I use LISTR, and would
like to be eligible for user support for 90 days and to be
notified of future versions of LISTR as they become available.
Registration Fee $15.00
Name:____________________________________________________
Address:_________________________________________________
_________________________________________________
_________________________________________________
_________________________________________________
( ) My check or money order for $15.00 (US funds) is
included.
I want any updates supplied on ( ) 3½" disks ( ) 5¼" disks
I am currently using LISTR version ______________________
I obtained LISTR from ___________________________________
_________________________________________________________
I use LISTR for _________________________________________
_________________________________________________________
_________________________________________________________
==============================================================
Mail this completed form along with your payment to:
Brent W. Miller
565 Ninth Avenue
Menlo Park, CA 94025
Receipt of your registration will be acknowledged by return
mail.
_______
____|__ | (R)
--| | |-------------------
| ____|__ | Association of
| | |_| Shareware
|__| o | Professionals
-----| | |---------------------
|___|___| MEMBER
2/16/92